<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"></meta>
<title>fit</title>
<style>
    body {
        width: 50em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
	<br/>
	用户id&nbsp;:&nbsp;<input id="userId_edit" name="userId" class="easyui-textbox" value="" style="width:50%;"/>
	<br/><br/>
	<!-- 查询结果集 -->	
	<table id="dg" title="查询结果" class="easyui-datagrid" style="width:100%;height:auto;"
			url="/fit/api/fitnesshistories/datagrid"
			toolbar="#toolbar"
			rownumbers="true" pagination="true" fitColumns="true">
			<!-- table增加了pagination="true"属性，就增加了底部的分页工具栏 -->
		<thead>
			<tr>
				<!-- field必须不能重复，否则页面展示上比例调整起来很没有规律 -->
				<th data-options="field:'id',hidden:true">主键</th>
				<th field="userId" width="10">userId</th>
				<th field="trainingDay" width="20">训练日期</th>
				<th field="trainingName" width="20">训练名称</th>
				<th field="trainingLevel" width="20">训练难度</th>
				<th field="trainingPoints" width="20">训练部位</th>
				<th field="calorie" width="20">消耗热量</th>
				<th field="calorieUnit" width="20">热量单位</th>
				<th field="updateTime" width="20" formatter="formatDataTimeInQueryResult">修改时间</th>
			</tr>
		</thead>
	</table>
	<div id="toolbar">
		<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newRecord('新增训练信息')">新增训练信息</a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editRecord('修改训练信息')">修改训练信息</a>
		<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyRecord()">删除训练信息</a>
		
	</div>
	
	<!-- 下面dlg是为了有新增用户界面 -->
	<div id="dlg" class="easyui-dialog" style="width:800px;height:auto;padding:0px 0px"
			closed="true" buttons="#dlg-buttons">
		<div style="width:100%;height:260px;" fit="true">
			<form id="fm" method="post" novalidate>
				<table cellpadding="5" style="width:100%;">
					<tr>
						<td><label>训练名称</label></td>
						<td>
							<input type="hidden" id="editType_edit" name="editType" value="new"/>
							<input type="hidden" id="id_edit" name="id" value=""/>
							<input type="hidden" id="validStatus_edit" name="validStatus" value=""/>
						
							<input id="trainingName_edit" name="trainingName" class="easyui-textbox" value="" style="width:60%;"/>
							<input id="trainingLevel_edit" name="trainingLevel" class="easyui-textbox" value="" style="width:35%;"/>
						</td>
						<td><label>训练日期</label></td>
						<td>
							<input id="trainingDay_edit" name="trainingDay" class="easyui-textbox" value="" data-options="onChange:formatYearMonthDay,onBlur:formatYearMonthDay,prompt:'yyyy/MM/dd'" style="width:100%;"/>
						</td>
					</tr>
					<tr>
						<td><label>训练时长</label></td>
						<td>
							<input id="trainingTime_edit" name="trainingTime" class="easyui-textbox" value="" style="width:60%;"/>
							<input id="trainingTimeUnit_edit" name="trainingTimeUnit" class="easyui-textbox" value="" style="width:35%;"/>
						</td>
						<td><label>消耗热量</label></td>
						<td>
							<input id="calorie_edit" name="calorie" class="easyui-textbox" value="" style="width:60%;"/>
							<input id="calorieUnit_edit" name="calorieUnit" class="easyui-textbox" value="" style="width:35%;"/>
						</td>
					</tr>
					<tr>
						<td><label>主训练部位</label></td>
						<td>
							<input id="mainTrainingPoint_edit" name="mainTrainingPoint" class="easyui-textbox" value="" style="width:100%;"/>
						</td>
						<td><label></label></td>
						<td>
						</td>
					</tr>
					<tr>
						<td><label>训练部位</label></td>
						<td colspan="3">
							<input id="trainingPoints_edit" name="trainingPoints" class="easyui-textbox" style="width:100%;"/>
						</td>
					</tr>
					<tr>
						<td><label>备注</label></td>
						<td colspan="3">
							<input id="remark_edit" name="remark" class="easyui-textbox" data-options="multiline:true" value="" style="width:100%;height:100px">
						</td>
					</tr>
				</table>	
			</form>
		</div>
	</div>
	<!-- 下面dlg-buttons是为了让新增用户页面有保存和取消按钮 -->
	<div id="dlg-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveRecord()" style="width:90px">保存</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')" style="width:90px">取消</a>
	</div>
	
	<br/>
	<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
    <div id="echartsMain" style="width: 600px;height:400px;"></div>
	
</body>

<!-- 引入jquery' -->
<script src="/fit/jquery/3.3.1/jquery.min.js"></script>
<!-- 引入jquery-cookie -->
<script src="/fit/jquery/jquery-cookie/1.4.1/jquery.cookie.js"></script>

<!-- 引入echarts -->
<script src="/fit/echarts/echarts.min.js"></script>

<!-- easyui需要依赖jquery -->
<script src="/fit/jquery/easyui/jquery.easyui.min.js" type="text/javascript"></script>
<link href="/fit/jquery/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="/fit/jquery/easyui/themes/icon.css" rel="stylesheet" type="text/css" />

<script src="/fit/common/common-date.js"></script>
<script src="/fit/fitnessHistoryMain.js"></script>

</html>